//2009/07/26 17:36:59
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>

using namespace std;

class DivisorDigits
{
public:
    int howMany(int number)
    {
		int res = 0;
		int mod = 10;
		int div = 1;
		while(div <= number)
		{
			if((number%mod) / div != 0 && number % ((number%mod)/div) == 0)
				res++;
			mod *= 10;
			div *= 10;
		}
		return res;
    }
};
